var url = aDataSource.GetTarget(result, this.RDFS.GetResource(FLOCK_NS + "URL"), true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
var type = aDataSource.GetTarget(result, this.RDFS.GetResource(FLOCK_NS + "type"), true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
var title = aDataSource.GetTarget(result, this.RDFS.GetResource("http://home.netscape.com/NC-rdf#Name"), true).QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
this._logger.debug("foundResults: " + type + " " + uri);
switch(type) {
case "bookmark":
this._resultsBookmarks.push([url, title]);
break;
case "history":
this._resultsHistory.push([url, title]);
break;
}
}
}
this._searchesOutstanding--;
if (this._searchesOutstanding == 0) {
this._returnResults();
}
},
_returnResults: function()
{
this._logger.debug("_returnResults");
var resultSet = this.mDS;
var resultSetRoot = this.RDFS.GetResource("urn:flock:search:results");
var rootContainer = RDFCU.MakeSeq(resultSet, resultSetRoot);
var c;
var urlHash = {};
var url;
var title;
var favicon;
var result;
var resultCount = 0;
// return bookmark results
for (c = 0; c < this._resultsBookmarks.length && resultCount < this._maxResults; c++) {